package com.liner;

import java.util.Scanner;

public class IfElseIfDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入消费金额：");
        double price = scanner.nextDouble();
        if (price >= 2000) {
            System.out.println("本店活动满2000打5折");
            price *= 0.5;
        } else if (price >= 1000) {
            System.out.println("本店活动满1000打6折");
            price *= 0.6;
        } else if (price >= 500) {
            System.out.println("本店活动满500打7折");
            price *= 0.7;
        } else if (price >= 200) {
            System.out.println("本店活动满200打8折");
            price *= 0.8;
        } else if (price >= 100){
            System.out.println("本店活动满100打9折");
            price *= 0.9;
        }else {
            System.out.println("本次不打折");
        }
            System.out.println("最终消费金额为:" + price);


    }
}
